﻿using System;

class Program
{
    static void Main()
    {
        int first = int.Parse(Console.ReadLine());
        int second = int.Parse(Console.ReadLine());
        int mask;
        mask=first;
        if (first > second)
        {
            first = second;
            second = mask;
            Console.WriteLine(first);
            Console.WriteLine(second);
        }
    }
}